package com.yqg.education.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * live 实体类
 *
 * @author 张芸博
 * @since 2025-04-10
 */
@Getter
@Setter
public class Live implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 直播名称
     */
    private String name;

    /**
     * 课程ID
     */
    private Long courseId;

    /**
     * 教师ID
     */
    private Long teachId;

    /**
     * 直播链接
     */
    private String url;

    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime endTime;

    /**
     * 直播流程 0直播未开始；1直播进行中；2直播结束
     */
    private Integer flow;

    /**
     * 是否删除
     */
    private Integer isDelete;

    @TableField(exist = false)
    private String courseName;

    @TableField(exist = false)
    private String teachName;
}
